Data annotation - Merge clusters
library(Seurat)
Registered S3 method overwritten by 'data.table':
method from
print.data.table
Registered S3 method overwritten by 'htmlwidgets':
method from
print.htmlwidget tools:rstudio
Seurat v4 was just loaded with SeuratObject v5; disabling v5 assays and validation
routines, and ensuring assays work in strict v3/v4 compatibility mode
library(tidyverse)
── Attaching core tidyverse packages ────────────────────────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ──────────────────────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(CelltypeR)
Warning: replacing previous import ‘data.table::last’ by ‘dplyr::last’ when loading ‘CelltypeR’
Warning: replacing previous import ‘data.table::first’ by ‘dplyr::first’ when loading ‘CelltypeR’
Warning: replacing previous import ‘data.table::between’ by ‘dplyr::between’ when loading ‘CelltypeR’
Warning: replacing previous import ‘dplyr::filter’ by ‘flowCore::filter’ when loading ‘CelltypeR’
Warning: replacing previous import ‘ggplot2::margin’ by ‘randomForest::margin’ when loading ‘CelltypeR’
Warning: replacing previous import ‘dplyr::combine’ by ‘randomForest::combine’ when loading ‘CelltypeR’
Warning: replacing previous import ‘flowCore::filter’ by ‘dplyr::filter’ when loading ‘CelltypeR’
Warning: replacing previous import ‘flowViz::contour’ by ‘graphics::contour’ when loading ‘flowStats’
Warning: replacing previous import ‘data.table::melt’ by ‘reshape2::melt’ when loading ‘CelltypeR’
Attaching package: ‘CelltypeR’
The following object is masked from ‘package:ggplot2’:
annotate
Read in the step7 object
nsc <- readRDS("/Users/rhalenathomas/Documents/Data/scRNAseq/ADHD_ZNZ_Mcgill/ADHDresultsFeb10/NSC/step7/objs7/seu_step7.rds")
Warning message:
R graphics engine version 15 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
See the Dimplot
DimPlot(nsc, group.by = 'integrated_snn_res.0.25', label = TRUE)
DimPlot(nsc, group.by = "Celltypes1", label = TRUE)
#DimPlot(nsc, group.by = "Celltypes2", label = TRUE)
#DimPlot(nsc, group.by = "CelltypesMain", label = TRUE)
DimPlot(nsc, group.by = "CelltypesMain2", label = TRUE)
#DimPlot(nsc, reduction = "umap", label = TRUE, pt.size = 0.1, raster = FALSE)
NPC_glia <- FindMarkers(nsc, ident.1 = "NPC_glia", ident.2 = c("Progenitors", "NPC"), only.pos = TRUE)
| | 0 % ~calculating
|+ | 1 % ~13s
|++ | 2 % ~12s
|++ | 3 % ~12s
|+++ | 4 % ~12s
|+++ | 5 % ~20s
|++++ | 6 % ~19s
|++++ | 7 % ~17s
|+++++ | 9 % ~16s
|+++++ | 10% ~16s
|++++++ | 11% ~15s
|++++++ | 12% ~14s
|+++++++ | 13% ~14s
|+++++++ | 14% ~13s
|++++++++ | 15% ~13s
|++++++++ | 16% ~13s
|+++++++++ | 17% ~12s
|++++++++++ | 18% ~12s
|++++++++++ | 19% ~12s
|+++++++++++ | 20% ~12s
|+++++++++++ | 21% ~12s
|++++++++++++ | 22% ~11s
|++++++++++++ | 23% ~11s
|+++++++++++++ | 24% ~11s
|+++++++++++++ | 26% ~11s
|++++++++++++++ | 27% ~10s
|++++++++++++++ | 28% ~10s
|+++++++++++++++ | 29% ~10s
|+++++++++++++++ | 30% ~10s
|++++++++++++++++ | 31% ~09s
|++++++++++++++++ | 32% ~09s
|+++++++++++++++++ | 33% ~09s
|++++++++++++++++++ | 34% ~09s
|++++++++++++++++++ | 35% ~09s
|+++++++++++++++++++ | 36% ~08s
|+++++++++++++++++++ | 37% ~08s
|++++++++++++++++++++ | 38% ~08s
|++++++++++++++++++++ | 39% ~08s
|+++++++++++++++++++++ | 40% ~08s
|+++++++++++++++++++++ | 41% ~08s
|++++++++++++++++++++++ | 43% ~07s
|++++++++++++++++++++++ | 44% ~07s
|+++++++++++++++++++++++ | 45% ~07s
|+++++++++++++++++++++++ | 46% ~07s
|++++++++++++++++++++++++ | 47% ~07s
|++++++++++++++++++++++++ | 48% ~07s
|+++++++++++++++++++++++++ | 49% ~07s
|+++++++++++++++++++++++++ | 50% ~07s
|++++++++++++++++++++++++++ | 51% ~07s
|+++++++++++++++++++++++++++ | 52% ~06s
|+++++++++++++++++++++++++++ | 53% ~06s
|++++++++++++++++++++++++++++ | 54% ~06s
|++++++++++++++++++++++++++++ | 55% ~06s
|+++++++++++++++++++++++++++++ | 56% ~06s
|+++++++++++++++++++++++++++++ | 57% ~06s
|++++++++++++++++++++++++++++++ | 59% ~05s
|++++++++++++++++++++++++++++++ | 60% ~05s
|+++++++++++++++++++++++++++++++ | 61% ~05s
|+++++++++++++++++++++++++++++++ | 62% ~05s
|++++++++++++++++++++++++++++++++ | 63% ~05s
|++++++++++++++++++++++++++++++++ | 64% ~05s
|+++++++++++++++++++++++++++++++++ | 65% ~04s
|+++++++++++++++++++++++++++++++++ | 66% ~04s
|++++++++++++++++++++++++++++++++++ | 67% ~04s
|+++++++++++++++++++++++++++++++++++ | 68% ~04s
|+++++++++++++++++++++++++++++++++++ | 69% ~04s
|++++++++++++++++++++++++++++++++++++ | 70% ~04s
|++++++++++++++++++++++++++++++++++++ | 71% ~04s
|+++++++++++++++++++++++++++++++++++++ | 72% ~03s
|+++++++++++++++++++++++++++++++++++++ | 73% ~03s
|++++++++++++++++++++++++++++++++++++++ | 74% ~03s
|++++++++++++++++++++++++++++++++++++++ | 76% ~03s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~03s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~03s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~03s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~02s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~02s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~02s
|+++++++++++++++++++++++++++++++++++++++++++ | 84% ~02s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~02s
|++++++++++++++++++++++++++++++++++++++++++++ | 86% ~02s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 90% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~01s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~00s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~00s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=12s
View(Neurons_sub)
View(NPC_markers)
Name Fibroblast as Glia Keep NPC-glia Change Precursor vs NPC
NSC-vas is now NSC-APOA1 NSC- SOX2
NPC-MEF2C Progen is really NPC-POU5F1 NPC-S100B
Neurons-DCX (was neurons) Neurons-GRIA1 (was excitatory neurons)
See the neurons object
fcn <- readRDS("/Users/rhalenathomas/Documents/Data/scRNAseq/ADHD_ZNZ_Mcgill/ADHDresultsFeb10/FCN/step7/objs7/seu_step7.rds")
Transfer lables predictions
Myanchors <- FindTransferAnchors(reference = MBO ,query = fcn, dims = 1:30)
Performing PCA on the provided reference using 1076 features as input.
Projecting cell embeddings
Error in UseMethod(generic = "GetAssayData", object = object) :
no applicable method for 'GetAssayData' applied to an object of class "Assay5"
Visualize expression
proliferation = c("PCNA","MKI67")
neuralstem = c("SOX2","NES","PAX6","MASH1")
DotPlot(fcn, features = proliferation, group.by = "integrated_snn_res.0.25")
FeaturePlot(fcn, features = proliferation)
neuralstem = c("SOX2","NES","PAX6","MASH1")
DotPlot(fcn, features = neuralstem, group.by = "integrated_snn_res.0.25")
Warning in FetchData.Seurat(object = object, vars = features, cells = cells) :
The following requested variables were not found: MASH1
FeaturePlot(fcn, features = neuralstem)
Warning in FetchData.Seurat(object = object, vars = c(dims, "ident", features), :
The following requested variables were not found: MASH1
# simplify cell types 1
cluster.ids<-c("Differentating_to_neurons", "NSC", "NSC", "Neurons", "Endothelial", "Endothelial", "Endothelial", "NSC", "Neuroblasts", "Neurons")
Idents(fcn) <- 'integrated_snn_res.0.25'
names(cluster.ids) <- levels(fcn)
fcn <- RenameIdents(fcn, cluster.ids)
fcn <- AddMetaData(object=fcn, metadata=Idents(fcn), col.name = "CelltypesMain1")
DimPlot(fcn, label = TRUE, group.by = "CelltypesMain1")
NA
NA
NA